<template>
    <view class="u-p-32">
        <view class="u-card" v-if="lcCon">
            <u-parse :content="lcCon"></u-parse>
        </view>
      <view class="empty-con">
		<u-empty mode="message" :show="!lcCon" text="暂无流程信息"></u-empty>
	  </view>
    </view>
</template>
<script setup>
import { ref } from "vue"
import { getsylcApi } from "@/api/index"
import { onLoad } from "@dcloudio/uni-app"
import config from "@/config"
let lcCon = ref('')
const getsylcHandle = () => {
    getsylcApi().then(res => {
        console.log('res: ', res);
        if (res.success) {
            res.data.content = res.data.content.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi,
                function (match, capture) {
                    console.log("<img src='" + config.baseUrl + capture + "' >");
                    return "<img src='" + config.baseUrl + capture + "'>"
                })
            lcCon.value = res.data.content
        }
    })
}
onLoad(() => {
    getsylcHandle()
})
</script>
<style lang="scss" scoped></style>